load("@rules_pkg//pkg:mappings.bzl", "pkg_files")
load("//misc/bazel:pkg.bzl", "codeql_pack")

package(default_visibility = ["//visibility:public"])

alias(
    name = "dbscheme",
    actual = "//javascript/ql/lib:dbscheme",
)

alias(
    name = "dbscheme-stats",
    actual = "//javascript/ql/lib:dbscheme-stats",
)

pkg_files(
    name = "dbscheme-group",
    srcs = [
        ":dbscheme",
        ":dbscheme-stats",
    ],
    strip_prefix = None,
)

# We have to use a zip of the typescript parser wrapper, as it's generated by a genrule
# and we don't know a list of its output files.
codeql_pack(
    name = "javascript",
    srcs = [
        ":dbscheme-group",
        "//javascript/downgrades",
        "//javascript/externs",
        "//javascript/extractor:tools-extractor",
        "//javascript/resources",
    ],
    zips = {"//javascript/extractor/lib/typescript": "tools"},
)
